package cn.lisens.modules.file.model;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

import cn.lisens.common.entity.BaseEntity;

import java.util.Map;

public class FileEntity extends BaseEntity<FileEntity> {
	private static final long serialVersionUID = 1L;
    private String fileExtension;
    private String filePreview;
    private String fileMd5;
    private String fileContentType;
    private Map<String, Object> fileMetaMap;
    private String fileId;
    private String filePath;
    
    private String fileMeta;
    private FileUploadParams fileUploadParams;
    private Long fileSize;
    
    public void setFileExtension(final String fileExtension) {
        this.fileExtension = fileExtension;
    }
    
    public void setFileUploadParams(final FileUploadParams fileUploadParams) {
        this.fileUploadParams = fileUploadParams;
    }
    
    public String getFilePreview() {
        return this.filePreview;
    }
    
    @Length(min = 0, max = 64, message = "\u6587\u4ef6MD5\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7 64 \u4e2a\u5b57\u7b26")
    public String getFileMd5() {
        return this.fileMd5;
    }
    
}
